From: Clément Guérin Date: Sat, 14 Mar 2015 22:48:41 +0000 (+0100) Subject: screenshot: fix off-by-one selection size X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1481 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6380526c12e35b6274e933639f89c3a171b74b12;p=gnome-shell.git screenshot: fix off-by-one selection size Selecting the whole screen made a (scr_w-1,scr_h-1) sized screenshot. https://bugzilla.gnome.org/show_bug.cgi?id=746223 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 50c5f9d07..3a095b1b8 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -283,8 +283,8 @@ const SelectArea = new Lang.Class({ _getGeometry: function() { return { x: Math.min(this._startX, this._lastX), y: Math.min(this._startY, this._lastY), - width: Math.abs(this._startX - this._lastX), - height: Math.abs(this._startY - this._lastY) }; + width: Math.abs(this._startX - this._lastX) + 1, + height: Math.abs(this._startY - this._lastY) + 1 }; }, _onMotionEvent: function(actor, event) {